using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class HPChangeEffect : LogicalEffectBase
{
    HPChangeEffectData data;
    public override void Init(GameObject originalGameObject, object[] args = null)
    {
        base.Init(originalGameObject, args);
        data = effectData as HPChangeEffectData;
    }
    public override void OnApply()
    {
        if (data.hpChangeValue > 0)
        {
            gameObject.GetComponent<HealthControllerBase>().Recover(data.hpChangeValue);
        }
        else
        {
            gameObject.GetComponent<HealthControllerBase>().Hit(-data.hpChangeValue);
        }

    }

    public override bool GetLifeState()
    {
        return false;
    }
}
